Skip to content

Conversation

compiler-errors
Copy link
Member

Only had one callsite which was easily simplified.

Uplifted a comment that I think is much more useful living in ty::Const world.

@rustbot
Copy link
Collaborator

rustbot commented Oct 5, 2023

r? @b-naber

(rustbot has picked a reviewer for you, use r? to override)

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Oct 5, 2023
@@ -647,15 +647,35 @@ impl<'tcx> Cx<'tcx> {
out_expr: out_expr.map(|expr| self.mirror_expr(expr)),
},
hir::InlineAsmOperand::Const { ref anon_const } => {
let value =
mir::Const::from_anon_const(tcx, anon_const.def_id, self.param_env);
let value = mir::Const::Unevaluated(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This code is duplicated below. Maybe put this in a function?

@bors
Copy link
Collaborator

bors commented Oct 30, 2023

☔ The latest upstream changes (presumably #117405) made this pull request unmergeable. Please resolve the merge conflicts.

@compiler-errors
Copy link
Member Author

@rustbot ready

@rust-cloud-vms rust-cloud-vms bot force-pushed the yeet-mir-from_anon_const branch from ee4cfe8 to 6de5ea5 Compare November 17, 2023 23:51
@b-naber
Copy link
Contributor

b-naber commented Nov 18, 2023

@bors r+ rollup

@bors
Copy link
Collaborator

bors commented Nov 18, 2023

📌 Commit 6de5ea5 has been approved by b-naber

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Nov 18, 2023
TaKO8Ki added a commit to TaKO8Ki/rust that referenced this pull request Nov 18, 2023
…_const, r=b-naber

Yeet `mir::Const::from_anon_const`

Only had one callsite which was easily simplified.

Uplifted a comment that I think is much more useful living in `ty::Const` world.
TaKO8Ki added a commit to TaKO8Ki/rust that referenced this pull request Nov 18, 2023
…_const, r=b-naber

Yeet `mir::Const::from_anon_const`

Only had one callsite which was easily simplified.

Uplifted a comment that I think is much more useful living in `ty::Const` world.
bors added a commit to rust-lang-ci/rust that referenced this pull request Nov 18, 2023
Rollup of 6 pull requests

Successful merges:

 - rust-lang#116446 (Yeet `mir::Const::from_anon_const`)
 - rust-lang#116750 (Add Seek::seek_relative)
 - rust-lang#117110 (Suggest field typo through derefs)
 - rust-lang#117961 (Add `x suggest` entries for testing `mir-opt` and `coverage`)
 - rust-lang#118020 (Fix links to `From<{OwnedHandle, OwnedFd}> for std::process::Child{Stdin, Stdout, Stderr}` in 1.74 release notes)
 - rust-lang#118034 (bump few deps to fix unsoundness and drop few dup deps)

r? `@ghost`
`@rustbot` modify labels: rollup
@compiler-errors
Copy link
Member Author

@bors r-

@bors bors added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Nov 18, 2023
@TaKO8Ki
Copy link
Member

TaKO8Ki commented Nov 18, 2023

This pull request caused an error here.

#118044 (comment)

@compiler-errors compiler-errors force-pushed the yeet-mir-from_anon_const branch from 6de5ea5 to 8bf9c18 Compare November 25, 2023 18:01
@compiler-errors
Copy link
Member Author

Limited test to just x86_64 for asm support

@bors r=b-naber

@bors
Copy link
Collaborator

bors commented Nov 25, 2023

📌 Commit 8bf9c18 has been approved by b-naber

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Nov 25, 2023
GuillaumeGomez added a commit to GuillaumeGomez/rust that referenced this pull request Nov 25, 2023
…_const, r=b-naber

Yeet `mir::Const::from_anon_const`

Only had one callsite which was easily simplified.

Uplifted a comment that I think is much more useful living in `ty::Const` world.
bors added a commit to rust-lang-ci/rust that referenced this pull request Nov 25, 2023
…llaumeGomez

Rollup of 6 pull requests

Successful merges:

 - rust-lang#116446 (Yeet `mir::Const::from_anon_const`)
 - rust-lang#117871 (remove unused pub fns)
 - rust-lang#118017 (rustc_lint: address latent TODO)
 - rust-lang#118199 (Remove `HirId` from `QPath::LangItem`)
 - rust-lang#118272 (resolve: Avoid clones of `MacroData`)
 - rust-lang#118291 (rustdoc-search: clean up some DOM code)

Failed merges:

 - rust-lang#118201 (Miscellaneous `ObligationCauseCode` cleanups)
 - rust-lang#118256 (rustc: `hir().local_def_id_to_hir_id()` -> `tcx.local_def_id_to_hir_id()` cleanup)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 6361989 into rust-lang:master Nov 25, 2023
@rustbot rustbot added this to the 1.76.0 milestone Nov 25, 2023
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Nov 25, 2023
Rollup merge of rust-lang#116446 - compiler-errors:yeet-mir-from_anon_const, r=b-naber

Yeet `mir::Const::from_anon_const`

Only had one callsite which was easily simplified.

Uplifted a comment that I think is much more useful living in `ty::Const` world.
@compiler-errors compiler-errors deleted the yeet-mir-from_anon_const branch November 26, 2023 00:48
/// Literals are converted to `Const::Val`, const generic parameters are eagerly
/// converted to a constant, everything else becomes `Unevaluated`.
#[instrument(skip(tcx), level = "debug", ret)]
pub fn from_anon_const(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you so much for removing this... I never had any clue what it really does, it was such a complicated mess, but it's all sorts of stuff I didn't understand so I was not able to clean it up.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants